package com.ruoyi.ufox.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ufox.mapper.SysWeektimerSettingMapper;
import com.ruoyi.ufox.domain.SysWeektimerSetting;
import com.ruoyi.ufox.service.ISysWeektimerSettingService;

/**
 * 周模式设置Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-08-31
 */
@Service
public class SysWeektimerSettingServiceImpl implements ISysWeektimerSettingService 
{
    @Autowired
    private SysWeektimerSettingMapper sysWeektimerSettingMapper;

    /**
     * 查询周模式设置
     * 
     * @param settingId 周模式设置主键
     * @return 周模式设置
     */
    @Override
    public SysWeektimerSetting selectSysWeektimerSettingBySettingId(Long settingId)
    {
        return sysWeektimerSettingMapper.selectSysWeektimerSettingBySettingId(settingId);
    }

    /**
     * 查询周模式设置列表
     * 
     * @param sysWeektimerSetting 周模式设置
     * @return 周模式设置
     */
    @Override
    public List<SysWeektimerSetting> selectSysWeektimerSettingList(SysWeektimerSetting sysWeektimerSetting)
    {
        return sysWeektimerSettingMapper.selectSysWeektimerSettingList(sysWeektimerSetting);
    }

    /**
     * 新增周模式设置
     * 
     * @param sysWeektimerSetting 周模式设置
     * @return 结果
     */
    @Override
    public int insertSysWeektimerSetting(SysWeektimerSetting sysWeektimerSetting)
    {
        sysWeektimerSetting.setCreateTime(DateUtils.getNowDate());
        return sysWeektimerSettingMapper.insertSysWeektimerSetting(sysWeektimerSetting);
    }

    /**
     * 修改周模式设置
     * 
     * @param sysWeektimerSetting 周模式设置
     * @return 结果
     */
    @Override
    public int updateSysWeektimerSetting(SysWeektimerSetting sysWeektimerSetting)
    {
        sysWeektimerSetting.setUpdateTime(DateUtils.getNowDate());
        return sysWeektimerSettingMapper.updateSysWeektimerSetting(sysWeektimerSetting);
    }

    /**
     * 批量删除周模式设置
     * 
     * @param settingIds 需要删除的周模式设置主键
     * @return 结果
     */
    @Override
    public int deleteSysWeektimerSettingBySettingIds(Long[] settingIds)
    {
        return sysWeektimerSettingMapper.deleteSysWeektimerSettingBySettingIds(settingIds);
    }

    /**
     * 删除周模式设置信息
     * 
     * @param settingId 周模式设置主键
     * @return 结果
     */
    @Override
    public int deleteSysWeektimerSettingBySettingId(Long settingId)
    {
        return sysWeektimerSettingMapper.deleteSysWeektimerSettingBySettingId(settingId);
    }
}
